# -*- coding: utf-8 -*-
"""
@Author: 王少杰
@Date: 2025/8/28
@Time: 17:54
@FileName: register_business.py
@描述:
"""
from src.common.ReadCsv import read_csv_obj
from src.pages.others.register_page import RegisterPage


class RegisterBusiness(RegisterPage):
    def register_oa(self,row_num):
        data = read_csv_obj.read_case_data('register_case_data.csv', row=row_num)
        if data[1] == "RANDOM_PHONE":
            data[1] =self.random_phone()
        self.register(companyName=data[0], companyPhone=data[1], companyPassword=data[2], companyTruePassword=data[3])

if __name__ == '__main__':
    from selenium import webdriver
    driver = webdriver.Chrome()
    driver.maximize_window()
    driver.get('https://jxc.aesd.cn/login')
    RegisterBusiness(driver).register_oa(row_num=2)